<%@page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib uri="TowkerTagLib" prefix="rbac"%>
<%@ taglib uri="/WEB-INF/tags/CommonFunction.tld" prefix="cfn" %>  
<%@include file="/commons/include/html_doctype.html" %>
<html>
<head>
	<title>入仓单列表</title>
	<%@include file="/commons/include/get.jsp" %>
	<script type="text/javascript" src="${ctx}/js/calendar/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript">
		//放置脚本
		function openCopyPurchasePlan(){
			var source = encodeURIComponent(ctx+"/manage/warehouse/getCopyPurchasePlan.htm?typeid=&classId=&r=" + Math.random());
			var url = ctx + "/commons/showDialog.jsp?r=" + Math.random() + "&url=" + source;
			var r = window.showModalDialog(url, this, "dialogWidth=600px;dialogHeight=600px;scroll=no");
			if(r)
				location.reload();
		}
	</script>
</head> 
<body>
<table border="0" cellspacing="0" cellpadding="0" class="listLogo">
	<tr>
		<td class="title">入仓单列表</td>
		<td>
			<div class="menuTool">
			<a class="del" id="listFormDelAll" href="delInWarehouse.htm">删除所选</a>
			<a class="add" href="#"  OnClick="openCopyPurchasePlan();">复制采购计划申请单</a>
			<a class="add" href="addInWarehouse1.htm">添加</a>
			<a class="back" onClick="javascript:history.back();" href="#">返回</a>
			</div>
		</td>
	</tr>
</table>
<div class="line"></div>
<form id="queryForm" method="post" action="getInWarehouse.htm">
<table border="0" cellspacing="0" cellpadding="0" class="queryTable">
	<tr>
		<td class="title">入仓单号：</td>
		<td class="input"><input id="title" name="in_warehouse_code" class="input" value="${fn:escapeXml(param.in_warehouse_code)}" /></td>
	
		<td class="title">入库日期：</td>
		<td class="input"><input id="title" name="in_date"  value="${fn:escapeXml(param.in_date)}"  class="Wdate" onFocus="WdatePicker({isShowWeek:true})"/></td>
	
		<td class="title">入库时间：</td>
		<td class="input"><input id="title" name="in_time"  value="${fn:escapeXml(param.in_time)}" class="Wdate" onFocus="WdatePicker({isShowWeek:true})" /></td>
		
		<td class="title">入仓性质：</td>
		<td class="input">
			<select id="in_type" name="in_type">
				<option value="">请选择</option>
				<option value="1" <c:if test="${param.in_type==1}">selected="selected"</c:if> >产品入库</option>
				<option value="2" <c:if test="${param.in_type==2}">selected="selected"</c:if> >材料入库</option>
				<option value="3" <c:if test="${param.in_type==3}">selected="selected"</c:if> >自制半成品入库</option>
				<option value="4" <c:if test="${param.in_type==4}">selected="selected"</c:if> >采购单入库</option>
			</select>
		</td>
	</tr>
	<tr>
		<td class="title">仓库代码：</td>
		<td class="input">
		<select id="depot_code" name="depot_code">
				<option value="">请选择</option>
				 <c:forEach items="${deportList}" var="d" varStatus="status">
					<option value="${d.depot_code}" <c:if test="${d.depot_code==param.depot_code}">selected="selected"</c:if>>${d.depot_code}</option>
				</c:forEach>
		</select>
		</td>
	
		<td class="title">入仓审核单状态：</td>
		<td class="input">
		<select name="audit_status" id="audit_status">
			<option value="">请选择</option>
			<option value="0" <c:if test="${param.audit_status==0 }">selected="selected"</c:if> >未审核</option>
			<option value="1" <c:if test="${param.audit_status==1 }">selected="selected"</c:if>>已审核</option>
		</select>
		</td>
		<!--  
		<td class="title">入仓记账单状态：</td>
		<td class="input">
		<select name="acc_status" id="acc_status">
			<option value="">请选择</option>
			<option value="0" <c:if test="${param.acc_status==0 }">selected="selected"</c:if> >未记账</option>
			<option value="1" <c:if test="${param.acc_status==1 }">selected="selected"</c:if>>已记账</option>
		</select>
		</td>
		-->	
		<td class="query" colspan="2"><input id="_querySubmit_" type="submit" class="button" value="查询" /></td>
	</tr>
</table>
</form>
<div class="line"></div>
<form id="listForm" method="post" action="delInWarehouse.htm">
<table border="0" cellspacing="1" cellpadding="0" class="listTable">
	<tr class="list_title">
		<td style="width:3%"><input id="chkall" type="checkbox" /></td>
		<td>入仓单号</td>
		<td>财务统计核算期</td>
		<td>入库日期</td>
		<td>入仓单状态</td>
		<td>操作</td>
	</tr>
<c:forEach items="${pageModel.result}" var="d" varStatus="status">
	<tr class="${status.index%2==0?'list_even':'list_odd'}">
		<td nowrap="nowrap">
		<c:if test="${d.audit_status!=1}">
			<input name="keyIndex" type="checkbox" value="${d.id}" />
		</c:if>
		</td>
		<td>${fn:escapeXml(d.in_warehouse_code)}</td>
		<td>${fn:escapeXml(d.acc_period)}</td>
		<td>${cfn:formatDate(d.in_date, 'yyyy-MM-dd')}</td>
		<td>
		  <c:if test="${fn:escapeXml(d.status==1)}">已审核</c:if>
		  <c:if test="${fn:escapeXml(d.status==2)}">已记账</c:if>
		  <c:if test="${fn:escapeXml(d.status==3)}">已审核并记账</c:if>
	    </td>
		<td>
			<div class="menuTool">
			
			<c:if test="${d.audit_status!=1}">
			<a class="del" href="delInWarehouse.htm?keyIndex=${d.id}">删除</a>
			<a class="upd" href="updInWarehouse1.htm?keyIndex=${d.id}">修改</a>
			</c:if>
			
			<c:if test="${fn:escapeXml(d.audit_status==0)}">
			<a class="get" href="auditInWarehouse1.htm?keyIndex=${d.id}">审核</a>
			</c:if>
			<!--  
			<c:if test="${d.acc_status==0 && d.audit_status==1}">
			<a class="get" href="accInWarehouse1.htm?keyIndex=${d.id}">记账</a>
			</c:if>
			-->
			<a class="get" href="getInWarehouseById.htm?keyIndex=${d.id}">详细</a>
			</div>
		</td>
	</tr>
</c:forEach>
</table>
<input id="_submit_" type="submit" style="display:none;" />
</form>
<table border="0" cellspacing="0" cellpadding="0" class="bottomTable">
	<tr><td>${pageNav.page}</td></tr>
</table>
</body>
</html>
